//
// Unihan Input Method
//
// Copyright © 2002-2007 Sun Wah Linux Ltd.
//
//
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 2.1 of the
// License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
// USA
//
// $Id: stdif.h 757 2007-05-10 08:19:31Z roger $
//

/* FILE stdif.h */
#ifndef _STDIF_H
#define _STDIF_H

//typedef IME_Bool (*IME_Register_Function)(IME_Functions *, IMM_Functions *);

typedef struct _IMModuleControl {
	void *dlh;
	char *fullpath;
	IME_Bool (* ime_register)(IMM_Functions *, IME_Functions **);
} IMModuleControl;

typedef struct _StdIFIMList {
	IME_Functions *ime;
	IMM_Functions *imm;
	IME_PropertiesList *property_list;
	IME_InputMethod *im;
	IMModuleControl *control;
	struct _StdIFIMList *next;
	struct _StdIFIMList *prev;
} StdIFIMList;

typedef struct _StdifDataPerDesktop {
	iconv_t iconv;
} StdifDataPerDesktop;

typedef struct _StdifDataPerSession {
	StdIFIMList *curr_im;
	IME_InputContext *ic;
	IME_String *preedit;
	IME_CandidatesList *candidates_list;
	int luCurrCandOffset;
	int lookupShown;
} StdifDataPerSession;

int unihan_im_module_init(void);
void unihan_im_module_done(void);
int unihan_im_module_get_info(UnihanIMModuleArgList *args);

extern IMM_Functions *imm_functions;

#endif /* _STDIF_H */

// vi:ts=4:nowrap:cin:expandtab
